package controllers;

import models.School;
import play.mvc.Controller;
import play.mvc.Result;

import java.sql.*;

import com.google.cloud.sql.Driver;

public class Application extends Controller {

    public static Result index() {
        return ok(views.html.index.render());
    }

    public static Result showPrograms(String show) {
        return ok(views.html.programs.render(show));
    }

    public static Result showVisa() {
        return ok(views.html.visa.render());
    }

    public static Result showPrice() {
        return ok(views.html.price.render());
    }

    public static Result showHostel() {
        return ok(views.html.hostel.render());
    }

    public static Result showAbout() {
        return ok(views.html.about.render());
    }

    public static Result showProgramSteps(String program, String step) {
        return ok(views.html.programSteps.render(program, step));
    }

    public static Result showSchools() {
        return ok(views.html.schools.render(School.all()));
    }

    public static Result showSchool(Integer schoolId) throws SQLException {
        return ok(views.html.schoolPage.render(School.getById(schoolId)));
    }


}